package com.company.dianwoda;

import java.util.concurrent.CountDownLatch;

public class Test {

    public static void main(String[] args) throws InterruptedException {
        CountDownLatch latch = new CountDownLatch(10);
        for(int i = 0; i < 10; i++){
            Thread t = new Thread(() -> {
                System.out.println("Hello, DWD");
                latch.countDown();
            });
            t.start();
        }
        latch.await();
        System.out.println("Done all DWD");
    }

}
